R you ready to ggplot?
Overview
October 15, 2014
WHY USE R & ggplot2?
- Flexible
- Powerful
- Scaling
Difference between this plot...
ONE LINE OF CODE!!
facet_wrap(~year)
WHY USE R & ggplot2?
- Flexible
- Powerful
- Scaling
- Reproducible work
WHY USE R & ggplot2?
- Flexible
- Powerful
- Scaling
- Reproducible work
- Building block for other tools (ggvis, ggmap)
What is ggplot2?
- R package (An app for your smaRt phone)
- Rely on the Grammar of Graphics (gg)
Barriers to entry
- R: From point & click to writing code
- Learning Grammar of Graphics (gg) - as opposed to typology (list of charts)
Objective of the workshop
Remove those barriers
- Understand the gg framework
- Play with simple code
How do we do it?
- gg theory
- create simple plots
How do we do it?
- gg theory
- create simple plots
- create complex plot(s)
Napoleon's Russian Campaign: Original
Small multiples: Walmart stores